<template>
    <div class="firstPage">
      <div class="top">
        <div class="top_item">
          <div id="searchECharts"></div>
          <div class="top_right">
            <span class="top_title">搜索最多：</span>
            <span class="top_text">{{searchStr}}</span>
          </div>
        </div>
        <div class="top_item">
          <div id="oredrECharts"></div>
          <div class="top_right">
            <span class="top_title">下单最多：</span>
            <span class="top_text">{{oredrStr}}</span>
          </div>
        </div>
        <div class="top_item">
          <div id="collectECharts"></div>
          <div class="top_right">
            <span class="top_title">收藏最多：</span>
            <span class="top_text">{{collectStr}}</span>
          </div>
        </div>
      </div>
      <div class="cen">
      <div id="priceECharts"></div>
      <div class="cen_sel">
        <el-select v-model="priceDates" placeholder="请选择日期" @change="getPrice">
          <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value"> </el-option>
        </el-select>
      </div>
    </div>
    </div>
</template>
<script>
export default {
   data() {
      return {
        searchStr: '',
        oredrStr: '',
        collectStr: '',
        priceDates: '',
        options: [{
          value: '3',
          label: '7天内'
        },{
           value: '4',
          label: '一个月内'
        },{
           value: '6',
          label: '三个月内'
        },{
           value: '7',
          label: '半年内'
        },{
           value: '8',
          label: '一年内'
        }]
      }
   },
   activated() {
   }
}
</script>
<style scoped>
.firstPage{
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  padding: 20px;
  background-color: #EBF1F3;
}
.top{
  display: flex;
  justify-content: space-between;
  width: 100%;
  height: 240px;
}
.top_item{
  box-sizing: border-box;
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 32%;
  height: 100%;
  padding: 10px;
  background-color: #fff;
  box-shadow: 0px 2px 6px rgba(0, 0, 0, 0.04);
}
.top_right{
  position: absolute;
  bottom: 0;
  left: 0;
  z-index: 1;
  display: flex;
  justify-content: center;
  align-content: center;
  flex-wrap: wrap;
  width: 100%;
  height: 40px;
}
.top_title{
  display: inline-block;
  height: 40px;
  font-size: 16px;
  color: #43425D;
  line-height: 40px;
  text-align: center;
}
.top_text{
  display: inline-block;
  height: 40px;
  font-size: 16px;
  color: #43425D;
  line-height: 40px;
  text-align: center;
}
#searchECharts{
  width: 100%;
  height: 100%;
}
#oredrECharts{
  width: 100%;
  height: 100%;
}
#collectECharts{
  width: 100%;
  height: 100%;
}
.cen{
  position: relative;
  width: 100%;
  height: 300px;
  margin-top: 10px;
}
#priceECharts{
  width: 100%;
  height: 100%;
}
.cen_sel{
  position: absolute;
  top: 0px;
  right: 30px;
  z-index: 1;
}

</style>
